const session = require('express-session')
const RedisStore = require('connect-redis')(session)
const config = require('../config/config')
// session store
const sessionConfig = {
    host: config.redis.host,
    port: config.redis.port,
    ttl: config.redis.session_ttl,
};
module.exports = function (app) {
    app.use(session({
        store: new RedisStore(sessionConfig),
        secret: 'pay_service',
        resave: true,
        saveUninitialized: true,
    }))
};